<!doctype html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>最小的响应式动态网格瀑布流布局js插件|DEMO_jQuery之家-自由分享jQuery、html5、css3的插件库</title>
	<link rel="stylesheet" type="text/css" href="css/normalize.css" />
	<link rel="stylesheet" type="text/css" href="css/default.css">
	<style type="text/css">
		.demo {
		  position: relative;
		  opacity: 0;
		  transition: .2s ease;
		  margin-bottom: 60px;
		}

		.grid {
		  position: relative;
		  /* fluffy */
		  margin: 0 auto;
		  width: 98%;
		  /* end fluffy */
		}

		.grid-item {
		  position: absolute;
		  top: 0;
		  left: 0;
		   /* fluffy */
		   width: 180px;
		   height: 120px;
		   border-radius: 3px;
		   background-color: #536DFE;
		   /* end fluffy */
		   -webkit-transition: .3s ease-in-out;
		   -o-transition: .3s ease-in-out;
		   transition: .3s ease-in-out;
		}

		/* mq */

		@media (max-width: 600px) {
		  .grid-item {
		    width: 120px;
		    height: 80px;
		  }
		}
	</style>
	<!--[if IE]>
		<script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
	<![endif]-->
</head>
<body>
	<div class="htmleaf-container">
		<header class="htmleaf-header">
			<h1>最小的响应式动态网格瀑布流布局js插件 <span>A Minimal 2kb zero dependency cascading grid layout</span></h1>
			<div class="htmleaf-links">
				<a class="htmleaf-icon icon-htmleaf-home-outline" href="http://www.htmleaf.com/" title="jQuery之家" target="_blank"><span> jQuery之家</span></a>
				<a class="htmleaf-icon icon-htmleaf-arrow-forward-outline" href="http://www.htmleaf.com/jQuery/pubuliuchajian/201507312330.html" title="返回下载页" target="_blank"><span> 返回下载页</span></a>
			</div>
			<div class="htmleaf-demo center">
			  <a href="index.html" class="current">Default</a>
			  <a href="index2.html">结合 Dynamics.js 使用</a>
			</div>
		</header>
		<div class="demo">
	        <div class="grid">
	          <div class="grid-item"></div>
	          <div class="grid-item"></div>
	          <div class="grid-item" style="height: 245px;"></div>
	          <div class="grid-item"></div>
	          <div class="grid-item" style="height: 290px;"></div>
	          <div class="grid-item"></div>
	          <div class="grid-item" style="height: 140px;"></div>
	          <div class="grid-item" style="height: 200px"></div>
	          <div class="grid-item" style="height: 150px"></div>
	          <div class="grid-item"></div>
	          <div class="grid-item" style="height: 220px"></div>
	          <div class="grid-item" style="height: 205px"></div>
	          <div class="grid-item"></div>
	          <div class="grid-item"></div>
	          <div class="grid-item"></div>
	          <div class="grid-item"></div>
	        </div>
		</div>
		<div class="related">
		    <h3>如果你喜欢这个插件，那么你可能也喜欢:</h3>
		    <a href="http://www.htmleaf.com/jQuery/pubuliuchajian/201506021952.html">
			  <img src="related/1.jpg" width="300" alt="jQuery轻量级响应式图片网格布局瀑布流插件"/>
			  <h3>jQuery轻量级响应式图片网格布局瀑布流插件</h3>
			</a>
			<a href="http://www.htmleaf.com/jQuery/pubuliuchajian/201505311940.html">
			  <img src="related/2.jpg" width="300" alt="简单的Masonry瀑布流jQuery图片网格布局插件"/>
			  <h3>简单的Masonry瀑布流jQuery图片网格布局插件</h3>
			</a>
		</div>
	</div>
	
	<script src="js/minigrid.js"></script>
    <script>
      (function(){
        minigrid('.grid', '.grid-item', 6, null, 
          function(){
            var d = document.querySelector('.demo');
            d.style.opacity = 1;
          }
        );
        window.addEventListener('resize', function(){
          minigrid('.grid', '.grid-item');
        });
      })();
    </script>
</body>
</html>